<div ng-include="sys_html('common/_header')"></div>
<style>
    .fui-cell-group{width:100%;}
    .fullback-title{color:#999999;font-size:0.7rem;padding:0.75rem 0 0.5rem 0;}
    .fullback-info{}
    .fullback-info p{height:1rem;line-height: 1rem;font-size:0.625rem;color:#333;display: inline-block;padding:0 0.5rem 0 0;}
    .fullback-info p i{border:none;height:0.75rem;width:0.75rem;display: inline-block;background: #ff4753;color:#fff;font-size:0.4rem;line-height: 0.8rem;text-align: center;
        font-style: normal;border-radius: 0.75rem;-webkit-border-radius: 0.75rem;margin-right:0.25rem;}
    .fullback-remark{line-height: 1rem;font-size:0.6rem;color:#666;padding:0.2rem 0;}

</style>
<link rel="stylesheet" href="../core/resource/components/swiper/swiper.min.css">
<div class='fui-page fui-page-current page-goods-detail'>
	<!-- 顶部导航 下滑动显示 -->
    <div class="fui-header searchtop" style="border-bottom:1px solid #ebebeb;">
        <div class="fui-header-left">
            <img class="leftlogo" ng-src="{{tomedia(pagedata.setting.logo) || '../core/resource/images/nopic.jpg'}}"/> 项目详情
        </div>
        <div class="fui-header-right">
			<span href="javascript:;" ng-click="access_json('jy_zhongchou/upproject/')" class="label label-info">我也要筹款</span>
		</div>
    </div>

<!-- 其他开始 -->
<div class="fui-content" style="padding-bottom:2.5rem">
<div class="fui-cell-group fui-detail-group" style="padding-bottom:8px">
    <div class="fui-cell">
        <div class="fui-cell-text name ">
            {{pagedata.item.title}}
        </div>
    </div>
	<div ng-if="pagedata.item.subtitle" class="fui-cell goods-subtitle">
			<span class='text-block'>{{pagedata.item.subtitle}}</span>
	</div>
	<div class="fui-cell">
		<div class="fui-cell-text" style="margin-top:0.6rem;">
			<span class="fui-text"><img class="leftlogo" style="width:0.7rem;height:0.7rem;border-radius: 50%;" ng-src="{{tomedia(pagedata.user.headimgurl) || pagedata.user.member.avatar || '../core/resource/images/nopic.jpg'}}"/><span style="margin-left:3px;font-size:0.5rem;color:#999">{{pagedata.item.faname || '匿名用户'}}({{pagedata.item.relation || '朋友'}})</span></span>
        </div>
     </div>
	<div class="fui-cell">
		<div style="font-size:0.65rem;color:#666;" class="fui-cell-text flex">
		</div>
	</div>
	<div class="row" style="background:#f7f7f7;margin:0.3rem">
									<div class="col-jy-3">
										<span style="color: #f60;float:left;text-align:center;width:100%" class="bold">{{pagedata.item.getmoney}}</span>
										<span style="color: #9a9a9a;float:left;font-size:0.5rem;text-align:center;width:100%" class="ng-binding">已筹金额(元)</span>
									</div>
									<div class="col-jy-3">
										<div class="progress" style="margin:20px 3px;height:0.2rem;border-radius:0.05rem;">
											<div class="progress-bar" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" style="width: {{pagedata.item.progress || 1}}%;background-color:#3ae0ab;"><span class="sr-only">60% Complete</span></div>
										</div>
									</div>
									<div class="col-jy-3">
										<span style="color: #f60;float:left;text-align:center;width:100%" class="bold">{{pagedata.item.goalmoney}}</span>
										<span style="color: #9a9a9a;float:left;font-size:0.5rem;text-align:center;width:100%" class="ng-binding">目标金额(元)</span>
									</div>
   </div>
</div>
<div  class="fe-floatright-bottom right" style="bottom:70px">
		<a ng-click="pagedata.setshoucang();toogle(pagedata,'isshoucang')">
			<i ng-class="{'icon jinyunicon':1, 'icon-follow':pagedata.isshoucang!=1,'icon-xiai':pagedata.isshoucang==1}"></i>
		</a>
		<span style="font-size:0.5rem;color:#fff" ng-if="pagedata.isshoucang !=1">收藏</span>
		<span style="font-size:0.5rem;color:#fff" ng-if="pagedata.isshoucang ==1">已收藏</span>
</div>
<!--预售提示完成-->
<div  class='fui-cell-group fui-cell-click  fui-sale-group' style='margin-top:0'>
    <div class="fui-list">
        <div class="fui-list-media" style="margin-right: 0;align-self: flex-start;-webkit-align-self: flex-start">
            <div class='fui-cell-text'>
                <span style="font-size: 0.65rem;color: #666;vertical-align: top"></span>
            </div>
        </div>
        <div class="fui-list-inner" style="font-size:0.65rem;color:#666;">
         <span >发起人：{{pagedata.item.faname}}({{pagedata.item.relation || '朋友'}})</span><br/>
         <span>受助人：{{pagedata.item.shouname}}</span><br/>
         <span >发起时间：{{pagedata.item.createtime}}</span>
        </div>
    </div>
</div>
<div  class='fui-cell-group fui-cell-click  fui-sale-group' style='margin-top:0'>
    <div class="fui-list">
        <div class="fui-list-media" style="margin-right: 0;align-self: flex-start;-webkit-align-self: flex-start">
            <div class='fui-cell-text'>
                <span style="font-size: 0.65rem;color: #666;vertical-align: top"></span>
            </div>
        </div>
		<div class="fui-list-inner" style="font-size:0.65rem;color:#666;"><a href="javascript:" ng-click="access_json('jy_zhongchou/zhiyi/main/id='+pagedata.item.id)">详细内容：</a>
         <span ng-bind-html="trust(pagedata.item.desc)"></span><br/>
        </div>
		 <div class="fui-header-right">
			<span href="javascript:;"ng-click="access_json('jy_zhongchou/zhiyi/main/id='+pagedata.item.id)" class="label label-info">质疑/举报</span>
		</div>
    </div>
</div>
<div  class='fui-cell-group fui-cell-click  fui-sale-group' style='margin-top:0'>
    <div class="fui-list">
        <div class="fui-list-media" style="margin-right: 0;align-self: flex-start;-webkit-align-self: flex-start">
            <div class='fui-cell-text'>
                <span style="font-size: 0.65rem;color: #666;vertical-align: top"></span>
            </div>
        </div>证明材料：
        <div ng-repeat="img in pagedata.item.cailiao" class="fui-list-inner" >
          <div class="img"><img class='image' style="width: 102.4px;height:76.8px" ng-src="{{tomedia(img.pic)}}" /></div>
        </div>
    </div>
</div>
<div class="weui_cells_title">{{ifelse(pagedata.zhengming_sum>0,'已有'+pagedata.zhengming_sum,'暂无')}}人证明情况属实 <a href="javascript:" ng-click="access_json('jy_zhongchou/zhengming/main/id='+pagedata.project.id)">我{{ifelse(pagedata.zhengming_sum>0,'也','')}}来证明</a></div>
<div class="fui-tab-scroll" style="height: 3.6rem" >
			<div class="xcontainer weui_cells_radio3" style="z-index:0;height: 3.6rem;padding:0.3rem" >
			    <label class="jyui_cell_member" ng-repeat="item1 in pagedata.zhengming">
					<div class="userimg">
						<img class="img-circle"  ng-src="{{item1.member.avatar || '../core/resource/images/nopic.jpg'}}" width="40" height="40">
					</div>
					<div>
						<span style="font-size:0.3rem">{{item1.realname}}</span>
					</div>
				</label>
			</div>
</div>


<!--购买后显示-->
<div class="fui-cell-group fui-comment-group" ng-if="pagedata.paylog.length <1">
	<div class="fui-cell">
            <div class="fui-cell-label"></div>
			<div class="fui-cell-text">暂无支持</div>
			<div class="fui-cell-remark "> </div>
	</div>
</div>


<div ng-if="pagedata.paylog.length >0" class="detail-tab-panel">
    <div class="tab-panel comment-block show">
        <div class='container'>
			<!--评论模版-->
			<div  class="fui-cell-group fui-comment-group">
					<div ng-repeat="comment in pagedata.paylog" class="fui-cell">
						<div class="fui-cell-text comment">
							<div class="info head">
								<div class='img'><img ng-src="{{tomedia(comment.member.avatar) || '../core/resource/images/nopic.jpg'}}"/></div>
								<div class='nickname'>{{comment.member.nickname}}</div>
								<!--<div class="date">{{comment.createtime}}</div>-->
								<div class="star star1">
									<span ng-class="{'shine':comment.level >= 1}">支持了{{comment.fee}}元</span>
									
								</div>
							</div>
							<div class="remark">{{comment.msg}}</div>
							<div ng-if="comment.images.length>0" class="remark img">
								<div ng-repeat="img in comment.images" class="img"><img ng-src="{{tomedia(img)}}"/></div>
							</div>	
							<div class="options">{{pagedata.selespename}}</div>	
							<div ng-if="comment.reply_content" class="reply-content" style="background:#EDEDED;">
								掌柜回复：{{comment.reply_content}}
							 
								<div ng-if="comment.reply_images.length>0" class="remark img">
									
									<div ng-repeat="img in comment.reply_images" class="img"><img data-lazy="{{img}}" /></div>
								
								</div>
							   
							</div>
							<div ng-if="comment.append_content" class="remark reply-title">用户追加评价</div>
							<div class="remark">{{comment.append_content}}</div>
						   
							<div ng-if="comment.append_images.length>0" class="remark img">
								
								<div ng-repeat="img in comment.append_images" class="img"><img data-lazy="{{img}}" /></div>
							   
							</div>
							
							<div ng-if="omment.append_reply_content" class="reply-content" style="background:#EDEDED;">
								掌柜回复：{{comment.append_reply_content}}
							   
								<div ng-if="comment.append_reply_images.length>0" class="remark img">

									<div ng-repeat="img in comment.append_reply_images" class="img"><img data-lazy="{{img}}" /></div>
								</div>
							</div>
						</div>
					</div> 
			</div>
		<!--评价-->
		<div ng-if="showComments" class="fui-cell-group fui-comment-group">
				<div class="fui-cell fui-cell-click">
					<div class="fui-cell-text desc">评价({{count.all}})</div>
					<div class="fui-cell-text desc label"><span>{{pagedata.percent}}%</span> 好评</div>
					<div class="fui-cell-remark"></div>
				</div>
				<div ng-repeat="comment in pagedata.list" class="fui-cell">

					<div class="fui-cell-text comment ">
						<div class="info">
							<div class="star">
								<span ng-if="comment.level >= 1" class="shine">★</span>
								<span ng-if="comment.level >= 2" class="shine">★</span>
								<span ng-if="comment.level >= 3" class="shine">★</span>
								<span ng-if="comment.level >= 4" class="shine">★</span>
								<span ng-if="comment.level >= 5" class="shine">★</span>
							</div>
							<div class="date">{{comment.nickname}} {{comment.createtime}}</div>
						</div>
						<div class="remark">{{comment.content}}</div>
					   
						<div ng-if="comment.images.length>0" class="remark img">
						   
							<div ng-repeat="img in comment.images" class="img"><img data-lazy="{{img}}" height="50" /></div>
						  
						</div>
				 
					</div>
				</div>
			   <div style="text-align: center;margin: 0.8rem 0">
				   <span class="btn btn-default-o external btn-show-allcomment">查看全部评价</span>
			   </div>
			</div>
		</div>
    </div>
</div>
</div>
<!-- 下面是弹窗系列 -->
<div id="showhongbao"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0%;top:5%">
<div class="jymodal-content" style="background:url({{tomedia(pagedata.basic.pay_bg) || '../addons/jy_zhongchou/resource/img/h-480.png'}}) no-repeat;background-size:100% 100%;padding:30px">
		<div aria-hidden="true" data-dismiss="modal" class="closebtn" style="right:10px;top:0"><i class="icon jinyunicon icon-wrong"></i></div>
		<div class="fui-cell-group" style="padding:150px 15px 30px 15px;background:none;">
				
				<div class="fui-cell must noborder">
						<div id="oninput" class="fui-cell-text" style="white-space: nowrap;background:#fff;border-radius:1.2rem;padding:0.1rem 0.5rem;width:100%">红包金额：
						<input type="number" class='fui-input' onblur="reset_body()" onkeyup='clearNoNum(this)' placeholder="请输入红包金额" ng-model="pagedata.post.money" style="width:6rem;height:1.4rem;cursor: pointer;" />
						</div>
				</div>
				<div class="fui-cell must noborder" style="margin-top:0;padding-top:0">
					<div class="fui-cell-text name ">
						<span class="fui-tag fui-tag-red-o" ng-click="pagedata.post.money=10">10元</span><span class="fui-tag fui-tag-red-o" ng-click="pagedata.post.money=20">20元</span><span class="fui-tag fui-tag-red-o" ng-click="pagedata.post.money=50">50元</span>
						<span class="fui-tag fui-tag-red-o" ng-click="pagedata.post.money=100">100元</span><span class="fui-tag fui-tag-red-o" ng-click="pagedata.post.money=168">168元</span>
						<div class="coupon-mini" style="color:#fff;padding:0.2rem">快速选择一个金额发送 <i class="icon jinyunicon icon-yuding" style="font-size:0.5rem;color:#fff"></i></div>
					</div>
				</div>
				<div class="fui-cell must noborder" style="padding-top:0;">
						<div class="fui-cell-text" style="white-space: nowrap;background:#fff;border-radius:1.2rem;padding:0.1rem 0.5rem">留言：<input type="text" class='fui-input' onblur="reset_body()" placeholder="请输入您的姓名"  ng-model="pagedata.post.msg" style="width:8rem;height:1.4rem;"/></div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-info" style="color:#fff"><i class="icon jinyunicon icon-biaoqing" style="color:#fff"></i> 感谢您的支持~</div>
				</div>
				<a href='javascript:;' ng-click="pagedata.pay()" class='btn btn-success block bold' style="background:#FF9900;color:#CC3300;border-radius:1.2rem;height: 2rem;line-height: 1.9rem;padding: 0 0.6rem;">确认</a>
		</div>
</div>
</div>
</div>

<div class='fui-content' ng-if="!pagedata.item">
    <div class='content-empty'>
        <i class='icon icon-searchlist'></i><br/> 项目不存在!<br/><a href="{php echo mobileUrl()}" class='btn btn-default-o external'>到处逛逛</a>
    </div>
</div>
<!--分享弹层-->
<div id="showsharecover" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;top:0">
	<div id="cover">
		<div class='fui-mask-m visible'></div>
		<div class='arrow'></div>
		<div class='content'>请点击右上角<br/>通过【发送给朋友】<br/>邀请好友众筹</div>
	</div>
</div>
</div>

<!--分享二维码弹层-->
<div id="showsharecode" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
<div class="modal-dialog" style="width:100%;left:0;bottom:0">
<div class="modal-bottom">
    <div ng-if="pagedata.commission_data.codeShare==1" class="alert-content">
        <div class="alert" style="padding:0;">
            <i class="alert-close alert-close1 icon icon-close"></i>
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img src="{php echo tomedia($goodscode)}" width="100%" height="100%" class="alert-goods-img" alt="">
            </div>
        </div>
    </div>

    <div ng-if="pagedata.commission_data.codeShare==2" class="alert-content">
        <div class="alert2">
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img src="{php echo tomedia($goodscode)}" width="100%" height="100%" class="alert-goods-img" alt="">
            </div>
        </div>
    </div>

    <div ng-if="pagedata.commission_data.codeShare!=1 && pagedata.commission_data.codeShare!=2" class="alert-content">
        <div class="alert" style="padding:0;background: #f5f4f9;border:none;-webkit-border-radius: 0.3rem;border-radius: 0.3rem;top:2rem;">
            <i class="alert-close alert-close1 icon icon-close" style="right: -0.7rem;top: -0.8rem;background: #e1040d;border:none;z-index:10"></i>
            <div class="fui-list alert-header" style="-webkit-border-radius: 0.3rem;border-radius: 0.3rem;padding:0;">
                <img src="{php echo tomedia($goodscode)}" class="alert-goods-img" alt="">
            </div>

        </div>
    </div>
</div>
</div>
</div>
<!--底部按钮-->
<div class="fui-navbar bottom-buttons">
    <a  onclick="$('#showsharecover').modal();" class="nav-item favorite-item active">
        <span class="icon jinyunicon icon-fenxiang2" style="color:red;"></span>
        <span class="label" >分享</span>
    </a>
	<a  class="nav-item external" ng-click="pagedata.setshoucang();toogle(pagedata,'isshoucang')">
        <span ng-class="{'icon jinyunicon':1, 'icon-follow':pagedata.isshoucang!=1,'icon-xiai':pagedata.isshoucang==1}"></span>
        <span class="label">{{pagedata.isshoucang !=1?'收藏':'已收藏'}}</span>
    </a>
    <a  class="nav-item btn buybtn" onclick="$('#showhongbao').modal();">我要帮助</a>
</div>
</div>
<style type="text/css">
    .share-text1{text-align: center;padding:0.5rem 0.5rem 0;font-size:0.6rem;color:#666;line-height: 1rem;}
    .share-text2{text-align: center;padding:0 0.5rem 0.5rem;font-size:0.6rem;color:#666;line-height: 1rem;}
</style>
<script type="text/javascript">
function reset_body(){
	document.body.scrollTop = document.body.scrollTop;
}
scope.getComments =true;
scope.pagedata.showtype = 0;
//滚动加载
$(window).scroll(function(){
	var s =$(window).scrollTop();
	if(s > 100){
		scope.showtop = true;  //状态标记
	}else{
		scope.showtop = false;  //状态标记
	}
});

//收藏
scope.pagedata.setshoucang=function(){

	var params={
		data:{'isshoucang':scope.pagedata.isshoucang},
		op:'follow',
		callback:function(res){
			scope.$evalAsync();
		}
	};
	scope.post_json(params);
}
//发红包
scope.pagedata.pay=function(){
	var params={
		data:{'money':scope.pagedata.post.money,'msg':scope.pagedata.post.msg},
		op:'pay',
		callback:function(res){
			if(res.payid){
			$('#showhongbao').modal('hide');
				require(['tool'],function(tool){
					tool.pay(res.payid,function(res){
						if(res.type=='success'){
							scope.message('支付成功！');
							location.reload();
							
						}else{
							scope.message('支付失败！失败原因：'+res.message,'error');
						}
					});
				});
			}
		}
	};
	scope.post_json(params);

}
//减少
scope.pagedata.minus=function(){
	if(scope.pagedata.post.num <=1){
		return false;
	}
	scope.pagedata.post.num--;
	scope.$evalAsync();
}
//增加
scope.pagedata.plus=function(){
	scope.pagedata.post.num++;
	scope.$evalAsync();
}
//选择
scope.pagedata.get_optionsid=function(){
	var specid = scope.pagedata.post.specid;
		specid = specid.join('_');
	var params={
		data:{'specid':specid},
		op:'get_optionsid',
		callback:function(res){
			scope.pagedata.post.optionsid=res.options.id;
			scope.pagedata.options=res.options;
			scope.$evalAsync();
		}
	};
	scope.post_json(params);
}
//选择地址
scope.pagedata.change_address=function(id){
	var params={
		data:{'addressid':id},
		op:'change_address',
		callback:function(res){
			scope.pagedata.post.addressid=res.address.id;
			scope.pagedata.address=res.address;
			scope.$evalAsync();
		}
	};
	scope.post_json(params);
}
</script>